#include <iostream>
struct result
{
	int first;
	int second;
};
// 2 3 4 5
// 10
result force(int target,int num[],int len)
{
	result re;
	for (int i = 0; i < len; ++i) 
	{
		int surplus = target - num[i];
		for (int j = i + 1; j < len; ++j) 
		{
			if (surplus == num[j]) 
			{
				re.first=i;
				re.second=j;
				return re;
			}
		}
	}
	re.first=-1;
	re.second=-1;
	return re;
};

using namespace std;

int main()
{
	int target;
	int len;
	cout<<"输入待求目标和数组长度";
	cin>>target>>len;
	int num[len];
	cout<<"输入数组内容:";
	for(int i=0;i<len;i++)
	{
		cin>>num[i];
	}
	result re;
	re=force(target,num,len);
	if(re.first==-1||re.second==-1)
	{
		cout << "找不到这两个数\n";
	}
	cout << "结果为\n" 
	<<re.first+1<<'\n'
	<<re.second+1<<'\n';
	
	
}
/*
9 4
2 7 11 15 

*/